/**
* @author AlbertDarren
* @contact 2563491540@qq.com
*/
#include <iostream>

using namespace std;

int main_26()
{
    long long n,cnt=0;
    cin>>n;
    while (n!=1)
    {
        cnt++;
        if (1==n%2)
        {
            n=3*n+1;
        }
        else
        {
            n/=2;
        }
    }
    cout << cnt << endl;
	return 0;
}
